#!/usr/env/bin python
# -*- coding: utf-8 -*-

# @Time    : 2020-07-13 10:48 上午
# @Author  : yangdy
# @File    : 搜索插入位置
# @Software: PyCharmCE
from typing import List


class Solution:
    def searchInsert(self, nums: List[int], target: int) -> int:
        i, ln = 0, len(nums)
        while i < ln:
            if nums[i] >= target:
                return i
            i += 1
        return ln
